import client from '../utils/client.js';

const userAPI = {
    regist: (user) => client.post('/users', {user}),
    login: (email, password,username) => client.post('/users/login', { user: {email,password,username}}),
    updata: (user) => client.put('/users', {user}),
    get: (username) => client.get(`/users/${username}`),
    follow:(username)=>client.post('/follow/'+username),
    unfollow:(username)=>client.delete('/follow/'+username)
}

export default userAPI;
